package com.ruoyi.project.api.user;

import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.banner.domain.TBanner;
import com.ruoyi.project.system.banner.service.ITBannerService;
import com.ruoyi.project.system.config.service.IConfigService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * banner
 */

@RestController
@RequestMapping("/api/config")
public class WebSysConfigController extends BaseController {

    @Autowired
    private IConfigService configService;

    @ApiOperation("获取配置列表")
    @Log(title = "APP接口管理", businessType = BusinessType.OTHER)
    @PostMapping("/findConfigByKey")
    public AjaxResult findConfigByKey(String key, HttpServletRequest request) {
        return AjaxResult.success("成功",configService.selectConfigByKey(key));
    }





}
